projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7e508b
)
proto-shell: simplify no_proto_task assignment
author
Felix Fietkau
<
[email protected]
>
Sat, 23 May 2015 14:42:20 +0000
(16:42 +0200)
committer
Felix Fietkau
<
[email protected]
>
Sat, 23 May 2015 14:44:46 +0000
(16:44 +0200)
Signed-off-by: Felix Fietkau <
[email protected]
>
proto-shell.c
patch
|
blob
|
history
diff --git
a/proto-shell.c
b/proto-shell.c
index 50f1b5b1cc4b638872b37bbdadbab2b292650b9f..bac57e03176c8876ffa53d948b709a83986cf077 100644
(file)
--- a/
proto-shell.c
+++ b/
proto-shell.c
@@
-821,10
+821,7
@@
proto_shell_add_handler(const char *script, const char *name, json_object *obj)
handler->proto.flags |= PROTO_FLAG_NODEV;
tmp = json_get_field(obj, "no-proto-task", json_type_boolean);
- if (tmp && json_object_get_boolean(tmp))
- handler->no_proto_task = true;
- else
- handler->no_proto_task = false;
+ handler->no_proto_task = tmp && json_object_get_boolean(tmp);
tmp = json_get_field(obj, "available", json_type_boolean);
if (tmp && json_object_get_boolean(tmp))